package fi.solita.dojo.mazeserver.util

object Util {
	val random = new java.util.Random()  
  
	def clip(i: Int, max: Int, min: Int) = {
	    assert(max>min)
		if (i > max) max else if (i < min) min else i
	}

	def randomPositiveInt(max: Int): Int = {
			random.nextInt(max)
	}
 
    def randomBoolean(): Boolean = {
      random.nextBoolean
    }
}
